#ifndef __sleep_H
#define __sleep_H


#ifdef __cplusplus
extern "C" {
#endif 

#include "gd32e10x.h"
#include "globalDef.h"



#if _EnSleep_def

extern uint8_t	sleepStatue;



//下面写法有利于程序执行效率
#define sleep() sleepStatue = 1		//延时5秒再进入休眠
#define sleepImmediately() sleepStatue = 3		//立即进入休眠
#define wakeup() sleepStatue = 0



void sleep_process(void);

#endif	//_EnSleep_def

#if (!(_EnSleep_def))	//为了编译不报错
#define sleep() 
#define sleepImmediately() 
#define wakeup() 
#endif


#ifdef __cplusplus
}
#endif


#endif



